<%-- 
    Document   : login
    Created on : 15 nov. 2011, 20:15:55
    Author     : hocine
--%>
<%@page import="eu.fsiebert.polytech.db.mediatheque.entity.Adherent"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 


                        <div class="art-Block">
                            <div class="art-Block-tl"></div>
                            <div class="art-Block-tr"></div>
                            <div class="art-Block-bl"></div>
                            <div class="art-Block-br"></div>
                            <div class="art-Block-tc"></div>
                            <div class="art-Block-bc"></div>
                            <div class="art-Block-cl"></div>
                            <div class="art-Block-cr"></div>
                            <div class="art-Block-cc"></div>
                            <div class="art-Block-body">
                                <div class="art-BlockHeader">
                                    <div class="l"></div>
                                    <div class="r"></div>
                                    <div class="art-header-tag-icon">
                                        <div class="t">Espace membre</div>
                                    </div>
                                </div><div class="art-BlockContent">
                                    <div class="art-BlockContent-body">
                                        <div>
                                            <c:choose>
                                                <c:when test="${!empty(user)}">
                                                    <p>Bonjour <c:out value="${user.getPrenomAdherent()}"></c:out> !
                                                    <form method="post" name="login-form" action="User">
                                                        <input class="art-button" type="submit" name="action" value="Deconnexion"/>
                                                    </form>
                                                    <jsp:useBean id="panier" class="java.util.List" scope="session" />
                                                    <c:if test="${!empty(panier)}">
                                                        Vous avez ${panier.size()} item(s) dans votre panier.
                                                        <a class="art-button" href="Panier">Voir le panier</a>
                                                    </c:if>
                                                    <c:if test="${!empty(user.getCommandeDuJourList())}">
                                                        Un commande est en cours de traitement<br />
                                                        Pour voir le status de votre commande <a href="Commande" >cliquez ici</a>
                                                    </c:if>
                                                </c:when>
                                                <c:otherwise>
                                                    <c:if test="${!empty requestScope['login-error']}">
                                                        <p class="error"><c:out value="${requestScope['login-error']}"></c:out></p>
                                                    </c:if>
                                                    <form method="post" id="login-form" action="User">

                                                        <label for="form-login" style="width: 35%; display:inline-block;">Identifiant</label>
                                                        <input type="text" value="" name="login" id="form-login" style="width: 55%;" /> <br />
                                                        <label for="form-password" style="width: 35%; display:inline-block;">Mot de passe</label>
                                                        <input type="password" value="" name="password" id="form-password" style="width: 55%;" />
                                                            <span class="art-button-wrapper">
                                                                    <span class="l"> </span>
                                                                    <span class="r"> </span>
                                                                    <input class="art-button" type="submit" name="action" value="Connexion"/>
                                                            </span>
                                                    </form>
                                                </c:otherwise>
                                            </c:choose>
                                            
                                            
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
